@import './reset.less';
@import './animate.less';
*, *::after, *::before {
	-webkit-user-drag: none;
}

html {
  font-size: 16px;
}

.nobreak {
  white-space: nowrap;
}

.auto-hidden {
  .mixin-ellipsis-1;
}

.center {
  text-align: center;
}

.break {
  word-break: break-all;
}

.select {
  user-select: text;
}
.no-select {
  user-select: none;
}

table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  overflow: hidden;
  color: @color-theme_2-font;
  th {
    font-size: 12px;
    text-align: left;
    line-height: 38px;
    padding: 0 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  }
  tbody {
    tr {
      // border-top: 1px solid rgba(0, 0, 0, 0.12);
      transition: background-color 0.2s ease;
      + tr {
        border-top: 1px solid @color-theme_2-line;
      }
      &:hover {
        background-color: @color-theme_2-hover;
      }
      &.active {
        background-color: @color-theme_2-active;
      }
      &.selected {
        background-color: @color-theme_2-hover;
      }
      td {
        padding: 6px;
        position: relative;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 13px;
        line-height: 16px;
        vertical-align: middle;
      }
    }
  }
}


.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: .7em;
  // font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 2px;

  &.badge-light {
    background-color: #f8f9fa;
  }
  &.badge-secondary {
    color: #fff;
    background-color: #6c757d;
  }
  &.badge-info {
    color: #fff;
    background-color: #4baed5;
  }
  &.badge-warning {
    color: #fff;
    background-color: #ffa45a;
  }
  &.badge-danger {
    color: #fff;
    background-color: #ff705a;
  }
  &.badge-success {
    color: #fff;
    background-color: #32bc63;
  }
  &.badge-theme-success {
    color: @color-badge-success-font;
    background-color: @color-badge-success;
  }
  &.badge-theme-info {
    color: @color-badge-info-font;
    background-color: @color-badge-info;
  }
}

small {
  font-size: .8em;
}
.small {
  font-size: .9em;
}
strong {
  font-weight: bold;
}

.underline {
  text-decoration: underline;
}

svg {
  transition: @transition-theme;
  transition-property: fill;
}

button, input, textarea, a {
  color: @color-theme_2-font;
}

input, textarea {
  &::placeholder {
    color: @color-theme_2-font-label;
  }
}
::selection {
  color: @color-theme_2;
  background: @color-btn;
}

.hover, a {
  cursor: pointer;
  transition: color .2s ease;
  &:hover {
    color: @color-theme;
  }
  &:active {
    color: @color-theme-active;
  }
}

.scroll {
  overflow: auto;
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: rgba(0, 0, 0, 0);
  }
  &::-webkit-scrollbar-track {
    background-color: @color-scrollbar-track;
    border-radius: 3px;
    // background-color: rgba(0, 0, 0, 0.1);
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background-color: @color-scrollbar-thumb;
    // background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
  }
  &::-webkit-scrollbar-thumb:hover {
    border-radius: 3px;
    background-color: @color-scrollbar-thumb-hover;
    // background-color: rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
  }
}

each(@themes, {
  #container.@{value} {
    button, input, textarea, a {
      color: ~'@{color-@{value}-theme_2-font}';
    }

    .hover, a {
      &:hover {
        color: ~'@{color-@{value}-theme}';
      }
      &:active {
        color: ~'@{color-@{value}-theme-active}';
      }
    }
    .scroll {
      &::-webkit-scrollbar {
        background-color: rgba(0, 0, 0, 0);
      }
      &::-webkit-scrollbar-track {
        background-color: ~'@{color-@{value}-scrollbar-track}';
      }
      &::-webkit-scrollbar-thumb {
        background-color: ~'@{color-@{value}-scrollbar-thumb}';
      }
      &::-webkit-scrollbar-thumb:hover {
        background-color: ~'@{color-@{value}-scrollbar-thumb-hover}';
      }
    }
    table {
      color: ~'@{color-@{value}-theme_2-font}';

      tbody {
        tr {
          border-top-color: ~'@{color-@{value}-theme_2-line}';
          &:hover {
            background-color: ~'@{color-@{value}-theme_2-hover}';
          }
          &.active {
            background-color: ~'@{color-@{value}-theme_2-active}';
          }
          &.selected {
            background-color: ~'@{color-@{value}-theme_2-hover}';
          }
        }
      }
    }

    input, textarea {
      &::placeholder {
        color: ~'@{color-@{value}-theme_2-font-label}';
      }
    }
    ::selection {
      color: ~'@{color-@{value}-theme_2}';
      background: ~'@{color-@{value}-btn}';
    }

    .badge {
      &.badge-theme-success {
        color: ~'@{color-@{value}-badge-success-font}';
        background-color: ~'@{color-@{value}-badge-success}';
      }
      &.badge-theme-info {
        color: ~'@{color-@{value}-badge-info-font}';
        background-color: ~'@{color-@{value}-badge-info}';
      }
    }
  }
})
